<template>
  <a-table :columns="columns" :data-source="workFlowData" :pagination="false" />
</template>

<script>
import columns from './column'

export default {
  props: {
    bizScene: {
      type: Number,
      default: -1
    },
    bizId: {
      type: Number,
      default: -1
    },
    bizNo: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      columns,
      workFlowData: []
    }
  },
  mounted() {
    this.getFlowData({
      bizId: this.bizId,
      bizNo: this.bizNo,
      bizScene: this.bizScene
    })
  },
  methods: {
    async getFlowData(data) {
      try {
        const res = await this.$api.quotation.workFlow(data)
        this.workFlowData = res ? res.list : []
      } catch (e) {
        console.error(e)
      }
    }
  }
}
</script>
